package com.usercar.service.impl;

import com.usercar.pojo.CarPrice;
import com.usercar.mapper.CarPriceMapper;
import com.usercar.service.ICarPriceService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ${author}
 * @since 2021-08-14
 */
@Service
public class CarPriceServiceImpl extends ServiceImpl<CarPriceMapper, CarPrice> implements ICarPriceService {

    @Autowired
    private CarPriceMapper carPriceMapper;
    @Override
    public CarPrice selectByMessage(String pinpai, String chexi, String nianfen, String kuanshi) {
        Map<String,Object> map = new HashMap<>();
        map.put("pinpai",pinpai);
        map.put("chexi",chexi);
        map.put("nianfen",nianfen);
        map.put("kuanshi",kuanshi);
        return carPriceMapper.selectByMap(map).get(0);
    }
}
